package com.qsq.newsmanager.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by lining on 2017/3/28.
 */
public class News {

    //新闻ID
    private long newsId;
    //新闻标题
    private String title;
    //创建时间
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    private Date createTime;
    //新闻内容
    private String content;


    public News() {

    }

    public News(String title, Date createTime, String content) {
        this.title = title;
        this.createTime = createTime;
        this.content = content;
    }

    public long getNewsId() {
        return newsId;
    }

    public void setNewsId(long newsId) {
        this.newsId = newsId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }



    @Override
    public String toString() {
        return "News{" +
                "newsId=" + newsId +
                ", title='" + title + '\'' +
                ", createTime=" + createTime +
                ", content='" + content + '\'' +
                '}';
    }
}
